#include"Candy.h"
#define CANDY_PATH":/res/Drops.png"
#define CANDY_SPEED 5
Candy::Candy()
{
    m_candy.load(CANDY_PATH);
    m_x=450-m_candy.width()*0.5;
    m_y=0;
    m_free=true;
    m_speed=CANDY_SPEED;
    m_Rect.setWidth(m_Candy.width());
    m_Rect.setHeight(m_Candy.height());
    m_Rect.moveTo(m_x,m_y);
    void Candy::updatePosition()
    {
        if(m_free)
        {
            return;
        }
        m_y+=m_speed;
        m_Rect.moveTo(m_x,m_y);
        if(m_y<=m_Rect.height())
        {
            m_free=true;
        }
    }
}
